function initMyChart(queryParam) {
    /**
     * Add custom date formats
     */
    $('#myTable').empty()
    $.get('/api/html_param', queryParam, function (data) {
        var res = data.result.sort((a, b) => a.createTime - b.createTime);

        if (res && res.length) {
            let tableHtml = '<div>total:'+res.length+'</div><table data-role="table" data-mode="columntoggle" class="ui-responsive">'
            let thead = ['<tr>'], keys = [], tbody = [], priority = {createTime: 1, tem1: 1, ct: 1};
            for (var key in res[0]) {
                keys.push(key)
                thead.push('<th data-priority="' + (priority[key] || 3) + '">' + key + '</th>')
            }
            thead.push('</tr>')

            for (let item of res) {
                tbody.push('<tr>')
                for (let k of keys) {
                    let itemElement = k == 'createTime' ? dateFtt('yyyy-MM-dd hh:mm:ss', new Date(item[k] * 1000)) : item[k];
                    tbody.push('<td>' + itemElement + '</td>')
                }
                tbody.push('</tr>')
            }
            tableHtml += `<thead>${thead.join('')}</thead><tbody>${tbody.join('')}</tbody></table>`;
            $('#myTable').html(tableHtml).trigger("create")

            var tempData, ctimes, startTime;
            tempData = res.map(a => {
                return {
                    x: a.createTime * 1000, y: a.tem1
                }
            });
            ctimes = res.map(a => {
                return {
                    x: a.createTime * 1000, y: a.ct
                }
            });
            startTime = res[0].createTime * 1000;
            Highcharts.setOptions({global: {useUTC: false}});
            Highcharts.dateFormats = {
                W: function (timestamp) {
                    var date = new Date(timestamp);
                    return date.toLocaleString();
                }
            };
            Highcharts.chart('myCharts', {
                chart: {
                    zoomType: 'x'
                },
                title: {
                    text: '炉温曲线'
                },
                subtitle: {text: '(每30秒读一次)'},
                xAxis: {
                    type: 'datetime'
                },
                yAxis: [{
                    labels: {format: '{value}\xb0c'},
                    title: {
                        text: '度(°C)'
                    }
                }, {
                    opposite: true,
                    tickInterval: 20,
                    title: {text: '秒(s)'},
                    labels: {
                        formatter: function () {
                            return this.value + 's';
                        }
                    }
                }],
                tooltip: {
                    formatter: function () {
                        var s = '<b>' + new Date(this.x).toLocaleString() + '</b>';
                        $.each(this.points, function (i, v) {
                            if (i) sym = '秒'; else sym = "\xB0c";
                            s += '<br/>' + this.series.name + ': ' +
                                this.y + sym;
                        });
                        return s;
                    },
                    crosshairs: true,
                    // valueSuffix: '\xB0C',
                    valueDecimals: 2,
                    shared: true
                },
                series: [{
                    name: '实时温度',
                    data: tempData,
                    pointInterval: 30 * 1000,
                    pointStart: startTime * 1,
                    zIndex: 99
                },
                    {
                        name: '一个周期关闭时间', type: 'column',
                        data: ctimes, pointInterval: 30 * 1000, yAxis: 1, color: 'rgba(255,1,1,0.4)',
                        pointStart: startTime * 1,
                    }]
            });
        } else alert('没有查到任何数据！')
    })


}
